﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductDetails.aspx.cs" Inherits="FYPHP.ProductDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:Panel ID="Panel1" runat="server">
        Welcome ,
        <asp:Label ID="lblUserName" runat="server"></asp:Label>
        <asp:Label ID="lblUserID" runat="server"></asp:Label>
        <br />
    </asp:Panel>

<table cellpadding="5" cellspacing="5" width="722" border="1" bordercolor="#aaa" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center">
 <tr style="background-color: #eee; font-weight: bold;"><td colspan="2">Details</td></tr>
 <tr><td width="310px">
 <a href="/uploads/products/<% Response.Write(getPic()); %>" title="" class="thickbox">
<img src="/uploads/products/<% Response.Write(getPic()); %>" alt="" height="300px" width="300px" />
</a><i style="font-size: 11px">Click to view larger size.</i>
</td>

<td style="text-align: left; margin-left: 40px;" valign="top">
Product ID : <asp:Label ID="lblID" runat="server" Text=""></asp:Label>
<br /><br />
Seller : <asp:Label ID="lblSeller" runat="server" Text=""></asp:Label>
<br /><br />
Description : <asp:Label ID="lblDesc" runat="server" Text=""></asp:Label>
<br /><br />
Category : <asp:Label ID="lblCat" runat="server" Text=""></asp:Label>
<br /><br />
Views : <asp:Label ID="lblView" runat="server" Text=""></asp:Label>

    <br />
    <br />
    Quantity Available :
    <asp:Label ID="lblQuantity" runat="server"></asp:Label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price/unit:
    <asp:Label ID="lblPrice" runat="server"></asp:Label>
    <br />
    <br />
    Quantity to purchase :
    <asp:DropDownList ID="ddlQuantity" runat="server">
    </asp:DropDownList>
    <br />
    <br />
    <asp:Button ID="btnAddShoppingCart" runat="server" 
        onclick="AddShoppingCart_Click" Text="Add to Shopping Cart" />
&nbsp;
    <asp:Button ID="btnReserveProduct" runat="server" 
        onclick="ReserveProduct_Click" Text="Reserve Product" />

    <br />

    <br />
    <asp:Button ID="btnRemoveProduct" runat="server" 
        onclick="btnRemoveProduct_Click" Text="Remove Product" Visible="False" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="btnEditProducts" runat="server" onclick="btnEditProducts_Click" 
        Text="Edit Product" Visible="False" />
    <br />

</td>
</tr>
</table>
<br />
<table width="722" cellpadding="5" cellspacing="0"  style="margin: 0 auto; border: 1px solid #aaa; line-height: 18px;">
<tr><td style="background-color: #dddddd; font-weight: bold; text-align: center; border-bottom: 1px solid #aaa">Comments</td></tr>

    <asp:Repeater ID="Repeater1" runat="server">
       
       <ItemTemplate>
        <tr style="background-color: #f3f3f3"><td colspan="2"><b>
        <a href="Default.aspx?uid=<%#DataBinder.Eval(Container.DataItem, "u_id" ) %>">
            <%#DataBinder.Eval(Container.DataItem, "username" ) %></a> </b> said :</td></tr>
        <tr><td>&nbsp;<%#DataBinder.Eval(Container.DataItem, "c_desc" ) %></td></tr>
        <tr>
            <td valign="bottom" style="text-align: right; font-size: 11px;">
            <i><%#DataBinder.Eval(Container.DataItem, "c_date" ) %></i>
                </td>
        </tr>

    </ItemTemplate>
    </asp:Repeater>
</table>

<table width="722" cellpadding="0" cellspacing="0"  style="margin: 0 auto;">
    <tr><td width="100%" valign="top" style="text-align: center;">
    <br />
<asp:TextBox ID="txtComment" runat="server" Height="100px" Width="600px" 
            TextMode="MultiLine" MaxLength="100"></asp:TextBox> <br />
                <asp:Button ID="btnAddComment" runat="server" Text="Add" 
            onclick="btnAddComment_Click" />&nbsp;
                <asp:Button ID="btnClear" runat="server" Text="Clear" />
    </td>
</tr>
</table>
</asp:Content>
